package com.jzg.jcptadmin.data.vo;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.File;

/**
 * Created by jzg on 2016/1/21.
 */
public class Body implements Parcelable {
    private String op;
    private String userId;
    private File file;
    private String sign;


    public Body(String op, String userId, File file,String sign) {
        this.op = op;
        this.userId = userId;
        this.file = file;
        this.sign = sign;
    }

    public String getOp() {
        return op;
    }

    public void setOp(String op) {
        this.op = op;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public File getFile() {
        return file;
    }

    public void setFile(File file) {
        this.file = file;
    }

    public Body() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.op);
        dest.writeString(this.userId);
        dest.writeSerializable(this.file);
        dest.writeString(this.sign);
    }

    protected Body(Parcel in) {
        this.op = in.readString();
        this.userId = in.readString();
        this.file = (File) in.readSerializable();
        this.sign = in.readString();
    }

    public static final Creator<Body> CREATOR = new Creator<Body>() {
        public Body createFromParcel(Parcel source) {
            return new Body(source);
        }

        public Body[] newArray(int size) {
            return new Body[size];
        }
    };
}
